package hah;

class ParkingSystem {
    private int big;
    private int medium;
    private int small;
    private int b=0;
    private int m=0;
    private int s=0;
    public ParkingSystem(int big, int medium, int small) {
            this.big=big;
            this.medium=medium;
            this.small=small;
    }

    public boolean addCar(int carType) {
        switch (carType) {
            case 1: if (b<big){
                    b++;
                    return true;
                    }else {
                    return false;
                    }
            case 2: if (m<medium){
                m++;
                return true;
            }else {
                return false;
            }
            case 3: if (s<small){
                s++;
                return true;
            }else {
                return false;
            }
            default:return false;
        }
    }
}